package com.manbu.live.msg.provider.config;

import java.util.concurrent.*;

/**
 * @author hanWang
 * @Title:
 * @Package
 * @Description:
 * @date 2024/1/282:09 AM
 */
public class ThreadManager {
   public static ThreadPoolExecutor commonAsyncThreadPool =  new ThreadPoolExecutor(2, 8, 3, TimeUnit.SECONDS, new LinkedBlockingDeque<>(), new ThreadFactory() {
       @Override
       public Thread newThread(Runnable r) {
           Thread thread = new Thread();
           thread.setName("commonAsyncPool-"+ThreadLocalRandom.current().nextInt(10000));
           return thread;
       }
   });
}
